# -*- coding: utf-8 -*-
# @Time    : 2024/1/4  17:54
# @Author  : zhanghao
# @FileName: event_type.py
# @Software: PyCharm
"""
    Description: 定义UI更新事件类型
"""
from enum import Enum


class ResponseResult(Enum):
    SUCCESS = 1
    FAILED = 2
    UNKNOWN = 3

    @staticmethod
    def description(status):
        desc = ''
        if status == ResponseResult.SUCCESS:
            desc = 'SUCCESS'
        elif status == ResponseResult.FAILED:
            desc = 'FAILED'
        else:
            desc = 'UNKNOWN'

        return desc

    @staticmethod
    def desc(status):
        desc = ''
        if status == ResponseResult.SUCCESS:
            desc = '成功'
        elif status == ResponseResult.FAILED:
            desc = '失败'
        else:
            desc = '未知'

        return desc
